home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / games / mac / __interesting_stuff__ / ad_d_pc_generator_1.5 / stack_-1.xml < prev    next >
Extensible Markup Language  |  1992-11-11  |  12KB  |  26 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.5</name>
  5.     <id>-1</id>
  6.     <cardCount>4</cardCount>
  7.     <cardID>2846</cardID>
  8.     <listID>2224</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>on printpush cardset lockScreen to truego firstset style of fld "Race" to "Transparent"set style of fld "Class" to "Transparent"set style of fld "Alignment" to "Transparent"set style of fld "Sex" to "Transparent"set style of fld "Lvl" to "Transparent"doMenu Print Stack...set style of fld "Race" to "Shadow"set style of fld "Class" to "Shadow"set style of fld "Alignment" to "Shadow"set style of fld "Sex" to "Shadow"set style of fld "Lvl" to "Shadow"pop cardend printon fileanswer "Open a file or save this sheet ?"┬¼with "Open" or "Save" or "Cancel"if it is "Cancel" then exit fileelse if it is "Save" thensaveFileelse if it is "Open" thenopenFileend ifend fileon openFileanswer file "What file to open ?" of type textif it is empty then exit openFileput it into fileNameopen file fileNamerepeat with c=1 to the number of cardsgo card crepeat with x=1 to the number of flds - 1 -- save "About" fieldread from file fileName until formFeedput it into fld xdelete last char of fld xend repeatend repeatclose file fileNameend openFileon saveFileanswer file "Name of file:",with fld "Char Name"if it is empty then exit saveFileopen file itrepeat with c=1 to the number of cardsgo card crepeat with x=1 to the number of flds - 1 -- Save "About" fieldwrite fld x & formFeed to file itend repeatend repeatclose file itend saveFileon setLockpush cardAnswer "Unlock or Lock Fields?" with "Unlock" or "Lock" or "Cancel"if it is "Cancel" then exit setLockif it is "Lock" then put true into lockFieldsif it is "Unlock" then put false into lockFieldsgo firstset lockText of fld "Str" to lockFieldsset lockText of fld "Str Mod" to lockFieldsset lockText of fld "Dex" to lockFieldsset lockText of fld "Con" to lockFieldsset lockText of fld "Int" to lockFieldsset lockText of fld "Wis" to lockFieldsset lockText of fld "Chr" to lockFieldsset lockText of fld "Height" to lockFieldsset lockText of fld "Weight" to lockFieldsset lockText of fld "Hit Points" to lockFieldspop cardend setLockon trashAnswer "Erase Everything ?" with "OK" or "Cancel"if it is "Cancel" then exit trashpush cardlock screengo firstrepeat with x=1 to the number of flds - 1 -- save "About" fieldput empty into fld xend repeatgo to card "W/P"click at loc of card fld "Empty"go to card "Inventory"click at loc of card fld "Empty"go to card "A/S"click at loc of card fld "Empty"go to card "XX"pop cardend trashon installButtonanswer "This will install a button in a stack." with "OK" or "Cancel"if it is "Cancel" then exit installButtonpush cardset cursor to 4put "Please wait..."lock screenlock messagesput the long name of this stack into goHeredelete word 1 of gohereput "go to " before gohereput "on mouseup" into first line of buttonScriptput gohere into second line of buttonScriptput "end mouseup" into third line of buttonScriptgo firstshow bg btn "AD&D Character Generator"choose button toolselect bg btn "AD&D Character Generator"doMenu "Copy Button"hide bg btn "AD&D Character Generator"answer file "Choose a stack to place the button in:" of type stackif it is empty then exit installButtongo itdoMenu "Paste Button"unlock screenset cursor to 2put "Just click where you want the button placed."repeat until the mouse is downset the loc of button "AD&D Character Generator" to the mouseLocend repeatset cursor to 4put "Please wait..."set the script of button "AD&D Character Generator" to buttonScriptchoose browse toolpop cardhide msgend installButtonon generateput "STR,DEX,CON,INT,WIS,CHR" into abListpush cardgo firstif the name of bg btn id 100 contains 1 thenrepeat with x=1 to 6put random(6) + random(6) + random(6) into fld item x of abListend repeatelse if the name of bg btn id 100 contains 2 thenrepeat with x=1 to 6put random(6) + random(6) + random(6) into num1put random(6) + random(6) + random(6) into num2put max(num1,num2) into fld item x of abListend repeatelse if the name of bg btn id 100 contains 3 thenshow cd fld "Choose"put empty into cd fld "Choose"repeat for 6put random(6) + random(6) + random(6) & return ┬¼after cd fld "Choose"end repeatrepeat with x=1 to 6put "  Choose a score for:" && item x of abList ┬¼into line 8-x of cd fld "Choose"wait until the mouseClickput word 2 of the clickLine into lineNumif lineNum Γëñ 7-x thenput line lineNum of cd fld "Choose" ┬¼into fld (item x of abList)delete line lineNum of cd fld "Choose"end ifend repeathide cd fld "Choose"else if the name of bg btn id 100 contains 4 thenshow cd fld "Choose"put empty into cd fld "Choose"repeat for 12put random(6) + random(6) + random(6) & return after cd fld "Choose"end repeatrepeat with x=1 to 6put "  Choose a score for:" && item x of abList ┬¼into line 14-x of cd fld "Choose"wait until the mouseClickput word 2 of the clickLine into lineNumif lineNum Γëñ 13-x thenput line lineNum of cd fld "Choose" ┬¼into fld (item x of abList)delete line lineNum of cd fld "Choose"end ifend repeathide cd fld "Choose"else if the name of bg btn id 100 contains 5 thenshow cd fld "Choose"put empty into cd fld "Choose"repeat for 6put random(6) & "," & random(6) & "," & random (6) & "," & random(6) ┬¼into listput min(list) into minimput sum(list) - minim into scoreput score & return after cd fld "Choose"end repeatrepeat with x=1 to 6put "  Choose a score for:" && item x of abList ┬¼into line 8-x of cd fld "Choose"wait until the mouseClickput word 2 of the clickLine into lineNumif lineNum Γëñ 7-x thenput line lineNum of cd fld "Choose" ┬¼into fld (item x of abList)delete line lineNum of cd fld "Choose"end ifend repeathide cd fld "Choose"else if the name of bg btn id 100 contains 6 thenput empty into cd fld "Choose"show cd fld "Choose"repeat with x=1 to 6put item x of abList & ":" && 8  & return after cd fld "Choose"end repeatrepeat with x=1 to 7put random(6) & return after cd fld "Choose"end repeatput "Choose a number and an ability." after cd fld "Choose"repeat foreverselect emptyif the number of lines in cd fld "Choose" Γëñ 7 then exit repeatwait until the mouseClickput word 2 of the clickLine into lineNumif lineNum ΓëÑ 7 ┬¼and lineNum Γëñ the number of lines in cd fld "Choose" - 1 thenselect line lineNum of cd fld "choose"put line lineNum of cd fld "Choose" into d6else next repeatwait until the mouseClickput word 2 of the clickLine into abLineif abLine Γëñ 6 thenif word 2 of line abLine of cd fld "Choose" + d6 > 18then next repeatelseadd d6 to word 2 of line abLine of cd fld "Choose"delete line lineNum of cd fld "Choose"end ifelse next repeatend repeathide cd fld "Choose"repeat with x=1 to 6put word 1 of line x of cd fld "Choose" into titledelete last char of titleput word 2 of line x of cd fld "Choose" into fld titleend repeatend ifpop cardend generateon createMenuif wrongStack() then pass createMenuif there is a menu "PC Generator" then exit createMenucreate menu "PC Generator"put createMenuItems() into menu "PC Generator" with menuMsg createMenuMsgs()end createMenuon uncreateMenuif wrongStack() then pass uncreateMenuif there is not a menu "PC Generator" then exit uncreateMenuelse delete menu "PC Generator"end uncreateMenufunction createMenuItemsif wrongStack() then pass createMenuItemsreturn "About PC Generator..." & return & ┬¼"-" & return & ┬¼"Open..." & return & ┬¼"Save..." & return & ┬¼"Print..." & return & ┬¼"-" & return & ┬¼"Generate" & return & ┬¼"Lock/Unlock..." & return & ┬¼"Trash" & return & ┬¼"-" & return & ┬¼"Install..."end createMenuItemsfunction createMenuMsgsif wrongStack() then pass createMenuMsgsreturn "show field" & quote & "About" & quote & return & ┬¼"" & return & ┬¼"openFile" & return & ┬¼"saveFile" & return & ┬¼"print" & return & ┬¼"" & return & ┬¼"Generate" & return & ┬¼"setLock" & return & ┬¼"trash" & return & ┬¼"" & return & ┬¼"installButton"end createMenuMsgsfunction wrongStackget the value of word 2 of the long name of mereturn (it is not line 1 of the stacks)end wrongStackon openStackif wrongStack() then pass openStackcreateMenupalette "AD&DPal","285,290"if the rect of the card window is the screenRect then hide menuBarpass openStackend openStackon closeStackif wrongStack() then pass closeStackif "AD&DPal" is in the windows then close window "AD&DPal"uncreateMenudoMenu "Compact Stack"pass closeStackend closeStackon resumeif wrongStack() then pass resumecreateMenupass resumeend resumeon suspendif wrongStack() then pass suspenduncreateMenupass suspendend suspendon resumeStackif wrongStack() then pass resumeStackcreateMenupass resumeStackend resumeStackon suspendStackif wrongStack() then pass suspendStackuncreateMenupass suspendStackend suspendStackon mouseUphide fld "About"if the number of this card is 1 then hide cd fld "Choose"end mouseUpfunction rnd hi,loput 0 into numput hi mod lo into divisif divis is not 0 thenput hi-lo into rangeput lo-1 into modifierput (the random of range)+modifier into numelseput hi/lo into dicerepeat for loadd the random of dice to numend repeatend ifreturn numend rndon updateTotalsclick at loc of fld "Hit Prob"click at loc of fld "Dam Adj"click at loc of fld "Weight Allow"click at loc of fld "Max Press"click at loc of fld "Open Doors"click at loc of fld "Bend Bars/Lift Gates"click at loc of fld "Reaction Adj"click at loc of fld "Missile Att Adj"click at loc of fld "Defence Adj"click at loc of fld "Hit Point Adj"click at loc of fld "System Shock"click at loc of fld "Resurr Survival"click at loc of fld "Poison Save"click at loc of fld "Regeneration"click at loc of fld "# of Lang"click at loc of fld "Spell Level"click at loc of fld "Chance to Lrn"click at loc of fld "Max # Sp/Lvl"click at loc of fld "Sp Immunity"click at loc of fld "Magic Def Adj"click at loc of fld "Bonus Spells"click at loc of fld "Chance Sp Fail"click at loc of fld "Sp Immunity 2"click at loc of fld "Max# Henchmen"click at loc of fld "Loyalty Base"click at loc of fld "Reaction Adj 2"end updateTotalsfunction sum listput 0 into totalrepeat with x=1 to number of items in listadd item x of list to totalend repeatreturn totalend sum</script>
  17.     <background id="2414" file="background_2414.xml" name="Char Sheet 2" />
  18.     <background id="2812" file="background_2812.xml" name="Char Sheet 1" />
  19.     <background id="5183" file="background_5183.xml" name="Char Sheet 3" />
  20.     <background id="6051" file="background_6051.xml" name="Char Sheet 4" />
  21.     <card id="2846" file="card_2846.xml" marked="false" name="" owner="2812" />
  22.     <card id="4245" file="card_4245.xml" marked="false" name="W/P" owner="2414" />
  23.     <card id="5772" file="card_5772.xml" marked="false" name="Inventory" owner="5183" />
  24.     <card id="5579" file="card_5579.xml" marked="false" name="A/S" owner="6051" />
  25. </stack>
  26.